Don't save mouse buttons in autoconfig #16098
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently when you're creating an autoconfig file it also adds some extra mouse buttons (usually "Gun Trigger" and "Gun Reload" as they're bound to mouse 1 and 2 by default) but RetroArch only parses buttons and axis when reading autoconfigs, so these extra lines are completely useless.
So when saving autoconfigs, instead of calling
input_config_save_keybind()
which saves buttons, axis and mouse buttons let's just save buttons and axis to make sure mouse buttons are ignored.Related Pull Requests
libretro/retroarch-joypad-autoconfig#1096
Reviewers
@sonninnos probably? It's a very small PR so shouldn't take long to review, I just want to make sure my logic is fine here and I'm also not sure if there's a better way to handle this.